from pages.base_page import BasePage


class FocusArea(BasePage):
    top_title = '//*[@resource-id="cool.dingstock.mobile:id/common_titlebar_title_tv"]'
    back_button = '//*[@resource-id="cool.dingstock.mobile:id/common_titlebar_left_icon"]'
    
    def get_title_text(self):
        """顶部title内容"""
        return self.get_xpath_text(self.top_title)
    
    def back_home_page(self):
        """返回主页"""
        self.click_xpath(self.back_button)